ostree.git
12 years agoUpdate .gitignore
Jasper St. Pierre [Thu, 5 Sep 2013 04:21:01 +0000 (00:21 -0400)]
Update .gitignore

12 years agomain: Call setlocale()
Colin Walters [Wed, 4 Sep 2013 20:44:54 +0000 (16:44 -0400)]
main: Call setlocale()

While we're not translating anything right now, we should still
setlocale() so that our output is formatted as command line users will
expect.

12 years agocore: Delete unused prototype
Colin Walters [Wed, 4 Sep 2013 12:22:13 +0000 (08:22 -0400)]
core: Delete unused prototype

12 years agocore: Delete unused ostree_create_temp_dir() API
Colin Walters [Wed, 4 Sep 2013 12:18:45 +0000 (08:18 -0400)]
core: Delete unused ostree_create_temp_dir() API

Nothing was using it.  Poof.  Gone!

12 years agolibostree: Move file creation APIs out of core, into checkout.c
Colin Walters [Wed, 4 Sep 2013 12:17:42 +0000 (08:17 -0400)]
libostree: Move file creation APIs out of core, into checkout.c

Since this was the only user, let's not have generic code to go from
OSTree representation -> filesystem here.  It should live in checkout.

12 years agocore: Remove unused prototypes
Colin Walters [Wed, 4 Sep 2013 11:54:32 +0000 (07:54 -0400)]
core: Remove unused prototypes

12 years agocore: Make a helper function private
Colin Walters [Wed, 4 Sep 2013 11:53:02 +0000 (07:53 -0400)]
core: Make a helper function private

Nothing was using this, so make it private.

12 years agocore: Make ostree_write_variant_with_size() private
Colin Walters [Wed, 4 Sep 2013 11:49:41 +0000 (07:49 -0400)]
core: Make ostree_write_variant_with_size() private

More work making the file formats and utilities private.

12 years agolibostree: Make the format of file objects private
Colin Walters [Tue, 3 Sep 2013 22:42:02 +0000 (18:42 -0400)]
libostree: Make the format of file objects private

It's now isolated almost entirely to ostree-core.c, except
ostree-repo.c needs to know how to create archive-z2 file headers.  So
give it a private API for that.

12 years agorepo: Drop ostree_repo_load_variant_c API
Colin Walters [Tue, 3 Sep 2013 22:23:11 +0000 (18:23 -0400)]
repo: Drop ostree_repo_load_variant_c API

Originally we had this to avoid forcing callers to malloc() if they
had a csum, but nowadays we have in-place conversion APIs that are
fast enough.

12 years agorepo: Only apply setuid/xattrs after checksum validation
Colin Walters [Thu, 29 Aug 2013 23:26:00 +0000 (19:26 -0400)]
repo: Only apply setuid/xattrs after checksum validation

See the new comment in the source; basically if we're fetching content
over http, then someone with the capability to MITM the network could
create a transient setuid binary on disk with arbitrary content.  If
they also had a process running on the system (such as an application)
it could be escalated to root.

https://bugzilla.gnome.org/show_bug.cgi?id=707139

12 years agolibostree: Change synchronous fetching API to return a stream
Colin Walters [Sat, 31 Aug 2013 15:22:55 +0000 (11:22 -0400)]
libostree: Change synchronous fetching API to return a stream

There's not a good reason to write small things such as repo/config to
the filesystem, only to read them back in again.  Change the
non-partial API to just return a stream, then read it into a memory
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=707157

12 years agofetcher: Only open files when we are ready to write to them
Colin Walters [Sat, 31 Aug 2013 14:51:14 +0000 (10:51 -0400)]
fetcher: Only open files when we are ready to write to them

Otherwise we quickly run out of file descriptors when doing large
requests.

https://bugzilla.gnome.org/show_bug.cgi?id=707157

12 years agofetcher: Clean up code to avoid intermediate files
Colin Walters [Fri, 30 Aug 2013 23:29:04 +0000 (19:29 -0400)]
fetcher: Clean up code to avoid intermediate files

I think originally we had the .part/.done separation because we were
trying to support partial downloads of files like repo/config and
repo/refs.

But now that the http server configuration won't give us partial
results, we don't need to support caching those files between runs.

And thus, there's no reason to have the .part/.done and do the dance
with renaming them.

When fetching objects/ and other things that use _with_async, we
continue to use _append_to(), and if the returned range tells us we
have all the bytes, then we hand the full file over to the caller.

Don't attempt to shortcut in the case where the last run told us we
already have the object; the object fetcher code will not make a
request.

While we're here, also clean up use of GError and consistently use the
cancellable from the pending.

https://bugzilla.gnome.org/show_bug.cgi?id=707157

12 years agoprepare-root: Fix ostree= kernel argument at end
Colin Walters [Sun, 1 Sep 2013 08:16:52 +0000 (04:16 -0400)]
prepare-root: Fix ostree= kernel argument at end

Extracting the code for parse_ostree_cmdline() and running it on some
test input (on RHEL6.4 glibc), I can reproduce the odd behavior from
getline() where it apparently returns the size of the default malloc
buffer in the size output, and some non-zero value.

This behavior would be OK except that it breaks the logic for
stripping off the trailing newline, which in turn breaks booting
because we return "ostree=foo\n".

This has worked so far in gnome-ostree because syslinux apparently
injects initrd=/path/to/initrd as a final kernel argment.

Anyways, we don't handle NUL characters here in /proc/cmdline, so
let's just call strlen () to be safe.

https://bugzilla.gnome.org/show_bug.cgi?id=707192

12 years agolibostree: Make introspectable again
Jasper St. Pierre [Sun, 1 Sep 2013 15:17:38 +0000 (11:17 -0400)]
libostree: Make introspectable again

At some point, the variable name for the headers changed and the
introspection build line forgot to be updated.

https://bugzilla.gnome.org/show_bug.cgi?id=707228

12 years agotests: Drop kernel modules from checksums
Colin Walters [Fri, 30 Aug 2013 22:12:31 +0000 (18:12 -0400)]
tests: Drop kernel modules from checksums

We can actually share these across different kernels.  Thanks to
Tobias Hunger <tobias.hunger@gmail.com> for pointing this out.

12 years agoadmin: Error out if we see malformed or mismatched checksums for /boot
Colin Walters [Fri, 30 Aug 2013 22:10:35 +0000 (18:10 -0400)]
admin: Error out if we see malformed or mismatched checksums for /boot

The kernel/initramfs both need to end in -SHA256 and match.

12 years agorepo: Use non-deprecated API with sufficiently new libarchive
Colin Walters [Fri, 30 Aug 2013 08:50:29 +0000 (10:50 +0200)]
repo: Use non-deprecated API with sufficiently new libarchive

Based on a patch Tobias Hunger <tobias.hunger@gmail.com>

12 years agoFix warning about format string not being a string literal
Tobias Hunger [Fri, 30 Aug 2013 08:34:55 +0000 (10:34 +0200)]
Fix warning about format string not being a string literal

12 years agoFix warnings about unused variables
Tobias Hunger [Fri, 30 Aug 2013 08:32:37 +0000 (10:32 +0200)]
Fix warnings about unused variables

12 years agogitignore: Add ostree-prepare-root and ostree-remount binaries
Tobias Hunger [Thu, 29 Aug 2013 22:56:09 +0000 (00:56 +0200)]
gitignore: Add ostree-prepare-root and ostree-remount binaries

12 years agoostree: Support for using EDITOR to fill commit subject/body
Stef Walter [Thu, 29 Aug 2013 15:23:20 +0000 (17:23 +0200)]
ostree: Support for using EDITOR to fill commit subject/body

Behave similar to git when 'ostree commit' is run without
a --subject or --body. Bring up an editor. The first line becomes
the subject and following lines become the --body after an optional
blank line.

Use similar logic to git in determining EDITOR

https://bugzilla.gnome.org/show_bug.cgi?id=707063

12 years agoostree: Fix bug printing out commit body
Stef Walter [Thu, 29 Aug 2013 16:14:28 +0000 (18:14 +0200)]
ostree: Fix bug printing out commit body

Body was printed out repeated and mangled due to bad printf format string.

https://bugzilla.gnome.org/show_bug.cgi?id=707067

12 years agopull: Clean up synchronous fetching code
Colin Walters [Wed, 28 Aug 2013 19:29:50 +0000 (15:29 -0400)]
pull: Clean up synchronous fetching code

Fold in fetch_uri to fetch_uri_utf8(), and rename the latter to
include _sync as a suffix, since it's synchronous.

Improve the status line to show when we're fetching a synchronous URI;
previously we just showed "Scanning metadata".

https://bugzilla.gnome.org/show_bug.cgi?id=707023

12 years agomain: Support passing bare directory names to commit
Colin Walters [Wed, 28 Aug 2013 21:32:21 +0000 (17:32 -0400)]
main: Support passing bare directory names to commit

It segfaulted before if you passed non-options, and a single directory
name is probably what people want.

12 years agopull: Add support for resuming downloads via range requests
Jeremy Whiting [Mon, 26 Aug 2013 20:59:55 +0000 (14:59 -0600)]
pull: Add support for resuming downloads via range requests

Use a consistent temporary filename to download uri's.
Check for downloaded files before fetching from uri.
Download to hash.part file, then copy/move to hash.done when complete.
Add argument support to setup_fake_remote_repo1 function.
Add test for pull resume.
To implement this, pass --force-range-requests into the trivial-httpd,
which will only serve half of the objects to clients at a time.

https://bugzilla.gnome.org/show_bug.cgi?id=706344

12 years agotest: Improve pull corruption test
Jeremy Whiting [Tue, 27 Aug 2013 22:01:43 +0000 (16:01 -0600)]
test: Improve pull corruption test

To verify pull with a second repo works.

12 years agobuild: Add a note that ostree only supports InstalledTests
Colin Walters [Tue, 27 Aug 2013 23:34:58 +0000 (19:34 -0400)]
build: Add a note that ostree only supports InstalledTests

12 years agorepo: Clean up tmpdir also on transaction abort
Colin Walters [Tue, 27 Aug 2013 15:32:26 +0000 (11:32 -0400)]
repo: Clean up tmpdir also on transaction abort

Pull the cleanup code to a helper function, and ensure we delete
leftover temporary files also when aborting a transaction.  Mainly
this will happen if a local 'ostree commit' fails.

While we're here, also change it to use gs_shutil_rm_rf() which also
handles directories, should we start using those.

Reviewed-by: Jeremy Whiting <jpwhiting@kde.org>
12 years agorepo: Clean up temporaries after a transaction completes
Jeremy Whiting [Mon, 26 Aug 2013 21:44:06 +0000 (15:44 -0600)]
repo: Clean up temporaries after a transaction completes

Prevously, we were just leaving temporary files there forever if
a transaction was interrupted.

https://bugzilla.gnome.org/show_bug.cgi?id=706344

12 years agotrivial-httpd: Add missing include for shutdown() on eglibc
Colin Walters [Mon, 26 Aug 2013 21:57:43 +0000 (17:57 -0400)]
trivial-httpd: Add missing include for shutdown() on eglibc

12 years agotrivial-httpd: Close the socket when sending partial files
Jeremy Whiting [Mon, 26 Aug 2013 20:52:43 +0000 (14:52 -0600)]
trivial-httpd: Close the socket when sending partial files

This will force the client to re-request them, which will be used to
test interrupted "ostree pull" requests.

https://bugzilla.gnome.org/show_bug.cgi?id=706344

12 years agoRelease 2013.6
Colin Walters [Mon, 26 Aug 2013 03:34:51 +0000 (23:34 -0400)]
Release 2013.6

12 years agodoc/adapting-existing: Describe /lib/passwd
Colin Walters [Sun, 25 Aug 2013 20:12:14 +0000 (16:12 -0400)]
doc/adapting-existing: Describe /lib/passwd

12 years agomain: Code cleanup by passing OstreeRepo * directly to builtins
Colin Walters [Sun, 25 Aug 2013 19:11:05 +0000 (15:11 -0400)]
main: Code cleanup by passing OstreeRepo * directly to builtins

It turns out every builtin (with one special exception) that takes a
repo argument did the same thing; let's just centralize it.  The
special exception was "ostree init --repo=foo" where foo is expected
to *not* actually be a repo.  In that case, simply skip the
ostree_repo_check() invocation.

https://bugzilla.gnome.org/show_bug.cgi?id=706762

12 years agolibostree: Improve commit filter API
Colin Walters [Sat, 17 Aug 2013 18:19:37 +0000 (14:19 -0400)]
libostree: Improve commit filter API

Make the structure private, and document the flags.

https://bugzilla.gnome.org/show_bug.cgi?id=706214

12 years agopull: Drop obsoleted "related objects" API
Colin Walters [Mon, 19 Aug 2013 23:13:53 +0000 (19:13 -0400)]
pull: Drop obsoleted "related objects" API

We removed support for writing "related objects" from ostree commits
in ostree git c9b61cbfee5d3cd0433ef14eac9ba9d1b24a0e38 because it just
didn't work out as an idea.  This also removes the API and code from
"ostree pull".

Note there was no test suite coverage.

https://bugzilla.gnome.org/show_bug.cgi?id=706342

12 years agorepo: Fix object storage size API to be 64 bit
Colin Walters [Sun, 18 Aug 2013 11:56:20 +0000 (07:56 -0400)]
repo: Fix object storage size API to be 64 bit

This fixes a pointer size warning on 32-bit builds.

https://bugzilla.gnome.org/show_bug.cgi?id=706235

12 years agodoc: Minor tweaks
Colin Walters [Sun, 25 Aug 2013 14:32:40 +0000 (10:32 -0400)]
doc: Minor tweaks

12 years agodoc/adapting-existing: Elaborate a bit more on FS layout and links
Colin Walters [Sun, 25 Aug 2013 14:23:19 +0000 (10:23 -0400)]
doc/adapting-existing: Elaborate a bit more on FS layout and links

12 years agodoc/adapting-existing: A bit more elaboration and a typo fix
Colin Walters [Sat, 24 Aug 2013 23:18:57 +0000 (19:18 -0400)]
doc/adapting-existing: A bit more elaboration and a typo fix

12 years agodoc: Add some docs about adapting existing package managers
Colin Walters [Sat, 24 Aug 2013 15:35:42 +0000 (11:35 -0400)]
doc: Add some docs about adapting existing package managers

12 years agopull: Update comment to better reflect current reality
Colin Walters [Fri, 23 Aug 2013 21:31:24 +0000 (17:31 -0400)]
pull: Update comment to better reflect current reality

12 years agodoc/repo: Describe object types
Colin Walters [Fri, 23 Aug 2013 21:21:31 +0000 (17:21 -0400)]
doc/repo: Describe object types

12 years agodoc/overview: Add a note about the GPL
Colin Walters [Fri, 23 Aug 2013 21:21:19 +0000 (17:21 -0400)]
doc/overview: Add a note about the GPL

12 years agodoc: Add a section about how atomic upgrades work
Colin Walters [Thu, 22 Aug 2013 23:14:23 +0000 (19:14 -0400)]
doc: Add a section about how atomic upgrades work

Migrating some content from
https://live.gnome.org/OSTree/DeploymentModel2

12 years agotrivial-httpd: Handle the autoexit case when the docroot is a symlink
Vivek Dasmohapatra [Thu, 22 Aug 2013 18:44:29 +0000 (19:44 +0100)]
trivial-httpd: Handle the autoexit case when the docroot is a symlink

12 years agotrivial-httpd: Close stdout & stdin so $() can capture output when daemonized
Vivek Dasmohapatra [Thu, 22 Aug 2013 18:43:44 +0000 (19:43 +0100)]
trivial-httpd: Close stdout & stdin so $() can capture output when daemonized

Will be used by tests.

12 years agotrivial-httpd: Handle -p - as meaning write-port-to-stdout
Vivek Dasmohapatra [Thu, 22 Aug 2013 17:28:14 +0000 (18:28 +0100)]
trivial-httpd: Handle -p - as meaning write-port-to-stdout

This is convenient to use from tests.

12 years agofetcher: Return NOT_FOUND when the HTTP code is 410 or 404
Vivek Dasmohapatra [Mon, 19 Aug 2013 17:13:44 +0000 (18:13 +0100)]
fetcher: Return NOT_FOUND when the HTTP code is 410 or 404

This will be used by the pull code to download optional data.

12 years agomain: Drop --archive option from init, now that the code is removed
Colin Walters [Mon, 19 Aug 2013 16:43:05 +0000 (12:43 -0400)]
main: Drop --archive option from init, now that the code is removed

Commit 1ec7c304086c14fe0540d9c371b66f64a7a81b2e removed archive mode,
so this bit needs to be removed too.

https://bugzilla.gnome.org/show_bug.cgi?id=706327

12 years agodoc: Split overview into chapters, expand a bit
Colin Walters [Thu, 22 Aug 2013 13:17:08 +0000 (09:17 -0400)]
doc: Split overview into chapters, expand a bit

12 years agodoc: Add a section on deployments
Colin Walters [Thu, 22 Aug 2013 12:47:50 +0000 (08:47 -0400)]
doc: Add a section on deployments

12 years agoadmin: notify detected bootloader configuration
Javier Martinez Canillas [Thu, 22 Aug 2013 02:00:45 +0000 (04:00 +0200)]
admin: notify detected bootloader configuration

OSTree now supports multiple bootloader backends so
notify which bootloader configuration was detected.

https://bugzilla.gnome.org/show_bug.cgi?id=706548

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
12 years agoadmin: Add API to OtBootloader to get name
Colin Walters [Thu, 22 Aug 2013 10:33:04 +0000 (06:33 -0400)]
admin: Add API to OtBootloader to get name

https://bugzilla.gnome.org/show_bug.cgi?id=706548

12 years agoadmin: Don't fail to deploy if there isn't a bootloader config
Javier Martinez Canillas [Tue, 20 Aug 2013 14:28:34 +0000 (14:28 +0000)]
admin: Don't fail to deploy if there isn't a bootloader config

Currently, when deploying an OSTree that does not contain a
bootloader configuration it fails with the following message:

"No known bootloader configuration detected"

A bootloader configuration is not strictly necessary if the
bootloader used is able to parse /boot/loader/entries on boot.

So, failing to deploy seems to be a little harsh. It is better
to just not write the bootloader configuration if a previous
one was not found but still swap the bootversion.

https://bugzilla.gnome.org/show_bug.cgi?id=706477

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
12 years agoadmin: Write out correct version fields in boot/loader/entries files
Colin Walters [Wed, 21 Aug 2013 22:48:00 +0000 (18:48 -0400)]
admin: Write out correct version fields in boot/loader/entries files

Before, we were writing the "bootversion", which is either 0 or 1, for
all entries.  This is completely wrong; the idea of the "version"
field is to compare between entries.

Fix this by writing out the inverted index - internally, index 0 is
the *first* boot entry, so we give it the highest version number, and
index N is the last, so give it version 0.

Then fix the deployment sorting code to correctly reverse the version
number comparison, so we read back the right order.

In practice before this bug didn't matter because "normally" you only
have at most two deployments.

https://bugzilla.gnome.org/show_bug.cgi?id=706546

12 years agodoc: Add repo docs
Colin Walters [Wed, 21 Aug 2013 12:26:24 +0000 (08:26 -0400)]
doc: Add repo docs

12 years agolibostree: Check out directories depth-first in serial, switch to sync API
Colin Walters [Tue, 20 Aug 2013 23:10:09 +0000 (19:10 -0400)]
libostree: Check out directories depth-first in serial, switch to sync API

The way we recurse into subdirectories in parallel makes it far too
easy to hit up against the arbitrary Linux fd limit of 1024.

Since the fix here is about dropping parallelism, let's just go all
the way for now and make a plain old synchronous API =(

This does simplify both internal callers which wanted a sync API
anyways.

https://bugzilla.gnome.org/show_bug.cgi?id=706380

12 years agomain: Add U-Boot bootlader backend support
Javier Martinez Canillas [Thu, 15 Aug 2013 10:33:25 +0000 (12:33 +0200)]
main: Add U-Boot bootlader backend support

This patch adds support to generate files that
can be used by Universal Bootloader (U-Boot).

U-Boot allows to modify boards default boot commands by
reading and executing a bootscript file or importing a
plain text file that contains environment variables that
could parameterize the boot command or a bootscript.

OSTree generates a uEnv.txt file that contains booting
information that is taken from Boot Loader Specification
snippets files as defined in the new OSTree deployment model:

https://wiki.gnome.org/OSTree/DeploymentModel2

On deploy or upgrade an uEnv.txt env var file is created
in the path /boot/loader.${bootversion}/uEnv.txt. Also, a
/boot/uEnv.txt symbolic link to loader/uEnv.txt is created
so U-Boot can always import the file from a fixed path.

Since U-Boot does not support a menu to list a set of
Operative Systems, the most recent bootloader configuration
from the list is used.

To boot an OSTree using the generated uEnv.txt file, a
board has to parameterize its default boot command using the
following variables defined by OSTree:

${kernel_image}:  path to the Linux kernel image
${ramdisk_image}: path to the initial ramdisk image
${bootargs}:      parameters passed to the kernel command line

Alternatively, for boards that don't support this scheme,
a bootscript that overrides the default boot command can be used.

An example of such a bootscript could be:

setenv scriptaddr 40008000
setenv kernel_addr 0x40007000
setenv ramdisk_addr 0x42000000
ext2load mmc 0:1 ${scriptaddr} uEnv.txt
env import -t ${scriptaddr} ${filesize}
ext2load mmc 0:1 ${kernel_addr} ${kernel_image}
ext2load mmc 0:1 ${ramdisk_addr} ${ramdisk_image}
bootm ${kernel_addr} ${ramdisk_addr}

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
https://bugzilla.gnome.org/show_bug.cgi?id=706370

12 years agoadmin: Extract ot_admin_join_config_lines() helper function
Javier Martinez Canillas [Tue, 20 Aug 2013 15:54:59 +0000 (17:54 +0200)]
admin: Extract ot_admin_join_config_lines() helper function

ot-bootloader-syslinux.c has a join_lines() function that is rather
generic and can be used in other places. Let's add it as a helper
function.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
https://bugzilla.gnome.org/show_bug.cgi?id=706370

12 years agotest: fix a trivial typo in libtests.sh
Javier Martinez Canillas [Thu, 15 Aug 2013 22:59:01 +0000 (00:59 +0200)]
test: fix a trivial typo in libtests.sh

When running the test-admin-deploy-1.sh unit test,
cat shows the following error:

cat: boot/vmlinuz-3-6.0: No such file or directory

due a trivial typo in the kernel image file name.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
https://bugzilla.gnome.org/show_bug.cgi?id=706371

12 years agolibostree: Extend gtk-doc coverage for refs and prune APIs
Colin Walters [Mon, 19 Aug 2013 14:16:05 +0000 (10:16 -0400)]
libostree: Extend gtk-doc coverage for refs and prune APIs

12 years agoostree.doap: Update description based on docs.
Colin Walters [Mon, 19 Aug 2013 13:01:20 +0000 (09:01 -0400)]
ostree.doap: Update description based on docs.

12 years agomain: Use macro to reduce duplication among builtin prototypes
Colin Walters [Mon, 19 Aug 2013 13:00:02 +0000 (09:00 -0400)]
main: Use macro to reduce duplication among builtin prototypes

Just less code.

12 years agoRevert "libotutil: Make use of GBytes in ot_variant_read()"
Colin Walters [Sun, 18 Aug 2013 11:51:25 +0000 (07:51 -0400)]
Revert "libotutil: Make use of GBytes in ot_variant_read()"

This reverts commit c77908bf514d61e75798932f61b5b414d9e36a3c; we can't
do this since g_variant_get_data_as_bytes() is a GLib 2.36 API.

12 years agolibotutil: Drop accidental use of GLib 2.36 API
Colin Walters [Sun, 18 Aug 2013 11:50:50 +0000 (07:50 -0400)]
libotutil: Drop accidental use of GLib 2.36 API

Sticking with 2.34 for a while longer.

12 years agoUse { 0, } for structure initialization rather than memset()
Colin Walters [Sat, 17 Aug 2013 11:59:23 +0000 (07:59 -0400)]
Use { 0, } for structure initialization rather than memset()

It's cleaner, safer, and I had a totally wrong idea stuck in my head
about why memset() should be used.

https://bugzilla.gnome.org/show_bug.cgi?id=705968

12 years agoRelease 2013.5
Colin Walters [Sat, 17 Aug 2013 21:05:17 +0000 (17:05 -0400)]
Release 2013.5

12 years agobuild: Fix and prettify build option output
Colin Walters [Sat, 17 Aug 2013 19:21:31 +0000 (15:21 -0400)]
build: Fix and prettify build option output

The documentation one was broken by the gtk-doc changes, and let's
align things.

12 years agoostree init: Fix mode list help string
Sjoerd Simons [Mon, 12 Aug 2013 08:53:03 +0000 (10:53 +0200)]
ostree init: Fix mode list help string

It's archive-z2, not archive-z.

https://bugzilla.gnome.org/show_bug.cgi?id=705849

12 years agoFix make distcheck
Sjoerd Simons [Mon, 12 Aug 2013 14:27:42 +0000 (16:27 +0200)]
Fix make distcheck

make distcheck was unhappy for various reasons:
  * headers aren't data, so use _HEADERS otherwise compilation fails
  * Mark the gir & typelib data as cleanfiles so they aren't left around
    after make clean
  * Don't nuke the .la file. This breaks make uninstall, leave it up to
    distributions to not install .la files if they don't want them.

https://bugzilla.gnome.org/show_bug.cgi?id=705850

12 years agolibostree: Delete some leftover remnant API for archive files
Colin Walters [Sat, 17 Aug 2013 18:08:04 +0000 (14:08 -0400)]
libostree: Delete some leftover remnant API for archive files

12 years agolibostree: Increase gtk-doc coverage of ostree-repo.[ch]
Colin Walters [Sat, 17 Aug 2013 17:57:22 +0000 (13:57 -0400)]
libostree: Increase gtk-doc coverage of ostree-repo.[ch]

12 years agolibostree: Add gtk-doc section for ostree-repo.c
Colin Walters [Sat, 17 Aug 2013 17:22:58 +0000 (13:22 -0400)]
libostree: Add gtk-doc section for ostree-repo.c

12 years agolibostree: More gtk-doc updates for ostree-core
Colin Walters [Sat, 17 Aug 2013 14:54:00 +0000 (10:54 -0400)]
libostree: More gtk-doc updates for ostree-core

12 years agodocs: Add an overview section, migrate some content from the wiki
Colin Walters [Sat, 17 Aug 2013 13:22:08 +0000 (09:22 -0400)]
docs: Add an overview section, migrate some content from the wiki

12 years agolibostree: Fix many gtk-doc warnings
Colin Walters [Sat, 17 Aug 2013 12:41:31 +0000 (08:41 -0400)]
libostree: Fix many gtk-doc warnings

12 years agocore: Drop duplicated type declarations
Colin Walters [Sat, 17 Aug 2013 12:23:28 +0000 (08:23 -0400)]
core: Drop duplicated type declarations

3 fewer gtk-doc warnings, 99 still left on the wall...

12 years agolibostree: Document more core macros
Colin Walters [Sat, 17 Aug 2013 12:21:04 +0000 (08:21 -0400)]
libostree: Document more core macros

12 years agoFix use of uninitialized memory in ostree_builtin_checksum()
Stef Walter [Wed, 14 Aug 2013 08:20:41 +0000 (10:20 +0200)]
Fix use of uninitialized memory in ostree_builtin_checksum()

https://bugzilla.gnome.org/show_bug.cgi?id=705968

12 years agoTODO: Tweak
Colin Walters [Sat, 17 Aug 2013 03:19:30 +0000 (23:19 -0400)]
TODO: Tweak

12 years agobuild: Fix the build without documentation
Colin Walters [Sat, 17 Aug 2013 03:14:30 +0000 (23:14 -0400)]
build: Fix the build without documentation

Just key everything of gtk-doc.

12 years agocore: Remove old "archive" mode
Colin Walters [Thu, 15 Aug 2013 10:34:48 +0000 (06:34 -0400)]
core: Remove old "archive" mode

We'll always have "bare" mode for keeping files-as-hardlinks as root.
But "archive" was my second attempt at a format for non-root file
storage, used by the gnome-ostree buildsystem which runs as non-root.

It was really handy to have a "tar" like mode where I can create
tarballs as a user, that contain files owned by root for example.

The "archive" mode stored content files as two pieces in the
filesystem; ".file" contained metadata, and ".filecontent" was the
actual content, uncompressed.  The nice thing about this was that to
check out a tree as non-root, you could just hardlink into the repo.

However, archive was fairly bad for serving via HTTP; it required
*two* HTTP requests per content object, greatly magnifing the already
inefficient fetch process.  So "archive-z2" was introduced.

To allow gnome-ostree to still check out trees as a user, the
"uncompressed-object-cache" was introduced, and that's how things have
been working for a while.

So we should just be able to kill this code.  Specifically note just
how much better the stage_object() function became.

https://bugzilla.gnome.org/show_bug.cgi?id=706057

12 years agoAdd gtk-doc support
Colin Walters [Sat, 17 Aug 2013 02:54:35 +0000 (22:54 -0400)]
Add gtk-doc support

Yes, it's really me.  Colin Walters.  Writing documentation.  You
don't need to do a DNA test.

12 years agoAdd 'ostree reset' command to undo a bad commit
Stef Walter [Wed, 14 Aug 2013 10:42:13 +0000 (12:42 +0200)]
Add 'ostree reset' command to undo a bad commit

Accepts the following arguments: ref checksum

Checks that the checksum is a parent of the ref before rewriting
the ref.

https://bugzilla.gnome.org/show_bug.cgi?id=705979

12 years agoconfigure: Use AS_IF() consistently
Colin Walters [Thu, 15 Aug 2013 22:33:19 +0000 (18:33 -0400)]
configure: Use AS_IF() consistently

See https://bugzilla.gnome.org/show_bug.cgi?id=681413

12 years agoInstall systemd units in the right location
Sjoerd Simons [Mon, 12 Aug 2013 17:27:27 +0000 (19:27 +0200)]
Install systemd units in the right location

Debian uses /lib/systemd/system for system unit files, while i'm
putting ostree under the /usr prefix which means the hardcoded path
fails. Leave it to configure to work out the right location for systemd
units (method copied from pollkit).

Furthermore instead of installing the unit in local-fs.target.wants by
hand add a [Install] section so systemctl enable does the right thing

https://bugzilla.gnome.org/show_bug.cgi?id=705864

12 years agocore: Use gs_stream_fstat()
Colin Walters [Thu, 15 Aug 2013 18:21:26 +0000 (14:21 -0400)]
core: Use gs_stream_fstat()

Just a cleanup.

12 years agocore: Add some more gtk-doc
Colin Walters [Thu, 15 Aug 2013 15:17:16 +0000 (11:17 -0400)]
core: Add some more gtk-doc

12 years agocore: Add some gtk-doc
Colin Walters [Thu, 15 Aug 2013 11:04:29 +0000 (07:04 -0400)]
core: Add some gtk-doc

Just documenting a few functions to get in the habit of things.

12 years agoAdd 'ostree log' command
Stef Walter [Wed, 14 Aug 2013 09:47:30 +0000 (11:47 +0200)]
Add 'ostree log' command

Follows the parent of commits showing each in turn until it reaches
the top of the commit tree.

https://bugzilla.gnome.org/show_bug.cgi?id=705973

12 years agoAdd ostree_commit_get_parent() to get parent from variant
Stef Walter [Wed, 14 Aug 2013 09:46:50 +0000 (11:46 +0200)]
Add ostree_commit_get_parent() to get parent from variant

https://bugzilla.gnome.org/show_bug.cgi?id=705973

12 years agoIntelligible display for 'ostree show'
Stef Walter [Wed, 14 Aug 2013 09:25:32 +0000 (11:25 +0200)]
Intelligible display for 'ostree show'

Show something similar to git metadata display. Show raw variant
data when --raw is specified

https://bugzilla.gnome.org/show_bug.cgi?id=705973

12 years agorepo: Add API to load any object as a stream
Colin Walters [Wed, 14 Aug 2013 22:18:10 +0000 (18:18 -0400)]
repo: Add API to load any object as a stream

We have APIs to load metadata as variants, and files as parsed
content/info/xattrs, but for some cases such as static deltas, all we
want is to operate on all objects in their canonical representation.

https://bugzilla.gnome.org/show_bug.cgi?id=706031

12 years agolibotutil: Make use of GBytes in ot_variant_read()
Colin Walters [Wed, 14 Aug 2013 23:54:30 +0000 (19:54 -0400)]
libotutil: Make use of GBytes in ot_variant_read()

This is just cleaner; we avoid using GObject data, etc.

https://bugzilla.gnome.org/show_bug.cgi?id=706031

12 years agocore: Add API to convert checksum -> csum in place
Colin Walters [Wed, 14 Aug 2013 22:17:09 +0000 (18:17 -0400)]
core: Add API to convert checksum -> csum in place

We already have the opposite, and this will be used in some
places to avoid a malloc.

https://bugzilla.gnome.org/show_bug.cgi?id=706031

12 years agolibotutil: Add API to create an "ay" GVariant from GBytes
Colin Walters [Wed, 14 Aug 2013 22:20:02 +0000 (18:20 -0400)]
libotutil: Add API to create an "ay" GVariant from GBytes

We used to have a version of this, but since I'm trying to use
GBytes more, this became a more common operation, and it's annoying
to type out the whole G_VARIANT_TYPE ("ay") each time, and pass
TRUE for trusted.

https://bugzilla.gnome.org/show_bug.cgi?id=706031

12 years agotrivial-httpd: Add --force-range-requests option to force range requests
Jeremy Whiting [Wed, 14 Aug 2013 20:08:25 +0000 (14:08 -0600)]
trivial-httpd: Add --force-range-requests option to force range requests

This will be used to test resuming interrupted downloads for
ostree-pull.

With this option, if a whole file is asked for, only half of the file
is given.  Then the client should retry with a range request, and
we'll give them the other half.

https://bugzilla.gnome.org/show_bug.cgi?id=705925